<div class="panel" id="examArrange">
    <table class="table record table-bordered table-striped">
        <tr> 
            <th>课程</th>
            <th>考试开始时间</th>
            <th>考试结束时间</th>
            <th>考试类型</th> 
            <th>状态</th>  
            <th >操作</th>               
        </tr>
        <tr ng-repeat="item in data.exams">
            <td>{{::item.courseName}}</td>
            <td>{{::item.startTime}}</td>
            <td>{{::item.endTime}}</td>
            <td>{{item.course.examName + (item.reExam ? "(补考)" : "")}}</td>
            <td>
                <span ng-if="item.finished && item.paperState == 0">未评分</span>
                <span ng-if="item.finished && item.paperState != 0">分数{{item.score}}    {{item.score < viewBag.scoreSetup.testPassScore ? "(不及格)" : "(及格)"}}</span>
                <span ng-if="!item.finished">未完成</span>
            </td>
            <td style="width:100px;">
                <div ng-if="item.finished">
                    <div ng-if="item.paperState == 1 && item.score < viewBag.scoreSetup.testPassScore">
                        <span ng-if="item.reExamed">补考已安排</span>
                        <span ng-if="!item.reExamed && item.ordered">补考已预约</span>
                        <input ng-if="!item.ordered && !item.reExamed" type="button" class="btn btn-sm btn-primary"  value="补考预约" ng-click="order(item.id)" />
                    </div>
                    <div ng-if="item.paperState!= 1 || item.score >= viewBag.scoreSetup.testPassScore">
                        <span>已完成考试</span>
                    </div>
                </div>
                <div ng-if="!item.finished">
                    <a ng-if="item.course.examType == 2" class="btn btn-success btn-sm" ui-sref="examTicket">打印准考证</a>
                    <button ng-if="item.course.examType == 1" ng-disabled="time>=(item.endTime|haomiao)" class="btn btn-info  btn-sm" ng-click="startExam(item.id)" >{{data.reExam?"开始线上补考":"开始线上考试"}} </button>
                    <button ng-if="item.course.examType == 0" class="btn btn-warning  btn-sm" ng-click="upload(data.id)">上传大作业</button>
                </div>
            </td>
        </tr>
    </table>
</div>
